1. Field of the Invention
The present invention relates to a memory management unit having a non-volatile memory for storing both rewritable and non-rewritable data such as program data that the memory management unit manages using a file system, an image forming apparatus including the memory management unit, a memory management method performed by the memory management unit, and a computer program comprised of program code that, when read by the memory management unit, executes the memory management method in the image forming apparatus.
2. Description of the Background Art
In general, non-volatile memory media such as a hard disk drive (HDD), a flash read-only memory (flash ROM), or the like used in a computer system can retain or store data even when power is not supplied to the non-volatile memory media (i.e., power OFF condition). However, if power supply to the non-volatile memory media is shut down while data is being written to the media, the data may be corrupted. If such data is being used as management information for a file system, access to certain files or directories may become impossible. Further, if a directory is corrupted, access to other files may also become impossible.
JP-2002-318732-A and JP-2005-025515-A describe methods for coping with such abrupt power shutdowns.
JP-2002-318732-A discusses a method of detecting data error and carrying out automatic data recovery after a power shutdown or a temporary blackout. Such method can, for example, reduce an inspection time after power supply is reintroduced, enhance data error inspection accuracy, and devise automatic data recovery. Such processes may be conducted as described in detail below.
When a file stored in a file storage device is accessed for data writing purposes, a file control unit adds access time data as counted by a counter to the information in the file when data is being written to the file; a memory unit stores the file information; a power shutdown processing unit stores blackout time data, detected by a power shutdown detector, to the memory unit; when power supply resumes after shutdown, which may be determined by a power shutdown determination unit, a file inspection unit inspects the file, which may be accessed for data writing right before or after the blackout time using the blackout time data, and conducts error detection; a file recovery unit recovers the file detected as having error using the file information stored in the memory unit.
The invention described in JP-2002-318732-A is concerned with issues of cost increase and extended recovery time, in which a power shutdown detection circuit for detecting power shutdown may be used with a search unit used for searching for corrupted files. For example, in JP-2002-318732-A, a time required for file recovery can be shortened by managing a file access time and power shutdown time. However, because time data is written to the non-volatile memory whenever a file is accessed, access speed declines. Further, a plurality of non-volatile memories is required to secure storage of access time data to the non-volatile memory when a power supply is shut down, which increases the cost.
JP-2005-025515-A discusses a method of recovering image data automatically even if the power supply is abruptly shut down.
Specifically, JP-2005-025515-A discusses an image forming apparatus that can recover image data automatically even if the power supply is abruptly shut down without setting a mode or conducting an image data inputting process after power supply is resumed. Further, the image forming apparatus can conduct such automatic recovery process without adding new hardware. The image forming apparatus includes a non-volatile memory to store mode setting and image data used for image forming operation. The image forming apparatus reads out data in the non-volatile memory and outputs image data corresponding to the mode setting again after power supply is resumed.
In such image forming apparatus, image data information, which may be used as management information for image data, and process-related information, which is required for conducting certain processes, is stored in the non-volatile memory when a normal processing operation is completed.
Then, when the power supply is shut down before completing a given intermediate process or an image output process and the power supply is resumed, it is determined whether image data processing, managed by the image data information, is to be conducted based on the process-related information stored in the non-volatile memory.
In JP-2005-025515-A, data stored in the non-volatile memory when power supply is shut down can be protected by duplicating the data. However, such method requires more memory, which increases the cost. Further, in JP-2005-025515-A, although a recovery function of file management table for file system can be enhanced, corrupted data may not be recovered completely if the data is heavily corrupted.
As for a MFP (multi functional peripheral)-type image forming apparatus, a controller may need to retain or store certain types of data even when power is not supplied to the MFP (i.e., power source OFF), and the type of data which needs to be retained in the non-volatile memory may vary depending on the type of application. For example, such data may be program data, apparatus-specific data, user data, or stored image data. The data may be classified based on certain specifications such as data-writing frequency, data size, data importance, data read/write speed, and detachability. Although a plurality of memory media such as HDD, flash ROM, NVRAM can be used based on classification of data, if data is stored in such memory media without regard to data type and memory type, a cost increase may occur.
As for HDD, flash ROM (e.g., NAND flash), and the like, memory cost per bit decreases significantly and large-capacity memories can be manufactured with reduced cost because of advancements in semiconductor fine processing techniques. However, memory cost per bit for NVRAM remains high because of the material used, which is different from that for HDD or flash ROM. Further, user data, which may be stored in a controller board, is one type of data that has higher importance. Because a user may need to use such user data if a controller board has failed or malfunctioned, such user data may need to be stored in a removable memory.
In view of such requirements for each type of data, the MFP may use a detachable NVRAM having small memory capacity to store data such as small-size data that needs to be transferred at a given situation, and may use NAND flash ROM or HDD having larger memory capacity to store data having larger volume such as program data, stored image data, and security data that is not suitable for a removable memory. The NAND flash ROM or HDD may be disposed on a controller board.
Further, a controller may need apparatus-specific data in addition to system program data to start up a computer system, wherein such apparatus-specific data may include authentication data for software and apparatus configuration. Such data required for system start-up, other than program data, may require data writing access control, which is different from installing upgraded program data for given software. Accordingly, such data may need to be stored in a read/writeable partition, which is different from program data, for example.
However, such read/writeable partition may include other various types of data, which may need to be written at a given timing. If a power shutdown occurs during a data writing process for given data, data required for system activation or start-up stored in the same partition may be affected by such power shutdown, by which file corruption may occur, which is not desirable for operating a computer system.